package com.newvpn.fastbest.zenith.dialog;

import android.view.View;
import android.widget.Button;

import com.newvpn.fastbest.zenith.R;


public class DisConnectDialog extends BaseDialog {

    private Button ok;

    public DisConnectDialog() {

    }

    public static DisConnectDialog newInstance() {
        return new DisConnectDialog();
    }


    @Override
    protected int layout() {
        return R.layout.v_dialog_disconnect;
    }

    @Override
    protected void init(View view) {
        view.findViewById(R.id.ok).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (mCallback != null){
                    mCallback.ok();
                }
                dismiss();
            }
        });

        view.findViewById(R.id.cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });
    }

    private Callback mCallback;

    public void setCallback(Callback callback) {
        mCallback = callback;
    }

    public interface Callback {
        void ok();
    }


}

